load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

rust_library(
    name = "utils",
    srcs = glob(["src/**"]),
    crate_name = "ic_utils",
    version = "0.9.0",
    deps = [
        # Keep sorted.
        "@crate_index//:hex",
        "@crate_index//:scoped_threadpool",
        "@crate_index//:serde",
        "@crate_index//:serde_bytes",
    ],
)

rust_test(
    name = "utils_test",
    crate = ":utils",
    deps = [
        # Keep sorted.
        "@crate_index//:assert_matches",
        "@crate_index//:serde",
        "@crate_index//:tempfile",
    ],
)

rust_doc_test(
    name = "utils_doc_test",
    crate = ":utils",
)
